/*
 * @Author: GYM-png 480609450@qq.com
 * @Date: 2024-10-13 11:05:20
 * @LastEditors: GYM-png 480609450@qq.com
 * @LastEditTime: 2024-10-25 20:53:29
 */
#ifndef __USART_DRV_H
#define __USART_DRV_H

#include "main.h"
#include "usart.h"

#include "dma.h"
#include "global.h"
#include "config.h"
#include "system.h"





uint8_t uart_dma_init(uint8_t uart_index, uint16_t rx_buf_size, uint16_t tx_buf_size);
void uart_idle_callback(uint8_t uart_index);
uint8_t uart_transmit(uint8_t uart_index, uint8_t* data, uint16_t len);
int uart_receive(uint8_t uart_index, uint8_t* data, uint32_t data_size, uint32_t time_out);
int uart_receive_from_isr(uint8_t uart_index, uint8_t* data, uint32_t data_size);
int uart_print_fast(uint8_t uart_index, const char* format, ...);
int uart_println_fast(uint8_t uart_index, const char* format, ...);
int uart_log_print(const char* format, ...);




#endif
